package dujiu.luogu.branch;

import java.util.Scanner;

public class P1422 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int total = scanner.nextInt();
        double money = 0; // 总电费
        if (total > 400){
            money += (total - 400)*0.5663;
            total = 400;
        }
        if (total > 150){
            money += (total - 150)*0.4663;
            total = 150;
        }
        money += total*0.4463;

        System.out.printf("%.1f",money);
    }
}
